<div class="form">

    <?php $form = $this->beginWidget('CActiveForm', array(
    'id' => 'locations-form',
    'enableAjaxValidation' => false,
    'htmlOptions' => array(
        'enctype' => 'multipart/form-data',
    )
)); ?>

    <p class="note">Fields with <span class="required">*</span> are required.</p>

    <?php echo $form->errorSummary($model); ?>
    <div class="row">

        <?php echo $form->labelEx($model, 'image'); ?>
        <?php echo $form->fileField($model, 'file');?>
        <?php echo $form->error($model, 'file'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'custno'); ?>
        <div class="model-data">
            <?php echo $model->custno; ?>
        </div>
        <?php echo $form->error($model, 'custno'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'locno'); ?>
        <div class="model-data">
            <?php echo $model->locno; ?>
        </div>
        <?php echo $form->error($model, 'locno'); ?>
    </div>


    <div class="row">
        <?php echo $form->labelEx($model, 'locname'); ?>
        <?php echo $form->textField($model, 'locname', array('size' => 50, 'maxlength' => 50)); ?>
        <?php echo $form->error($model, 'locname'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'locnickname'); ?>
        <?php echo $form->textField($model, 'locnickname', array('size' => 50, 'maxlength' => 50)); ?>
        <?php echo $form->error($model, 'locnickname'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'add1'); ?>
        <?php echo $form->textField($model, 'add1', array('size' => 50, 'maxlength' => 50)); ?>
        <?php echo $form->error($model, 'add1'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'add2'); ?>
        <?php echo $form->textField($model, 'add2', array('size' => 50, 'maxlength' => 50)); ?>
        <?php echo $form->error($model, 'add2'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'city'); ?>
        <?php echo $form->textField($model, 'city', array('size' => 30, 'maxlength' => 30)); ?>
        <?php echo $form->error($model, 'city'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'state'); ?>
        <?php echo $form->dropDownList($model, 'state', getStateList()); ?>
        <?php echo $form->error($model, 'state'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'zip'); ?>
        <?php echo $form->textField($model, 'zip', array('size' => 10, 'maxlength' => 10)); ?>
        <?php echo $form->error($model, 'zip'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'county'); ?>
        <?php echo $form->textField($model, 'county', array('size' => 10, 'maxlength' => 10)); ?>
        <?php echo $form->error($model, 'county'); ?>
    </div>




    <?php echo $form->hiddenField($model, 'taxfrp'); ?>

    <?php echo $form->hiddenField($model, 'salesref', array('size' => 15, 'maxlength' => 15)); ?>


    <div class="row">
        <?php echo $form->labelEx($model, 'disableemails'); ?>
        <?php echo $form->checkBox($model, 'disableemails'); ?>
        <?php echo $form->error($model, 'disableemails'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'locationinactive'); ?>
        <?php echo $form->dropDownList($model, 'locationinactive', $model->locationInactiveList); ?>
        <?php echo $form->error($model, 'locationinactive'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'timezone'); ?>
        <?php echo $form->dropDownList($model, 'timezone', $model->timeZoneList); ?>
        <?php echo $form->error($model, 'timezone'); ?>
    </div>


    <div class="row_buttons">
        <?php echo CHtml::submitButton('Update');
        //CHtml::submitButton($model->getSubmitButtonText(),array('disabled'=>($model->lockby!=NULL && $model->lockby!=Yii::app()->user->name)?'disabled':NULL,)); ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->